import { req } from '@/utils/request'

// 单据
export const listPeRecord = data => req.get('/cq/cqPeRecord/list', data)
export const enableRecord = data => req.post('/cq/cqPeRecord/enableTask', data)
export const disableRecord = data => req.post('/cq/cqPeRecord/disableTask', data)
// 保存检查记录
export const savePeRecord = data => req.post('/cq/cqPeRecord/savePeRecord', data)
// 集群列表
export const getDept1List = data => req.get('/cq/cqPeRecord/getDept1List', data)

// 项目
export const listPePro = data => req.get('/cq/cqPeRecord/listPePro', data)
export const editRltPro = data => req.post('/cq/cqPeRltPro/edit', data)
export const enableRltPro = data => req.post('/cq/cqPeRltPro/enableTask', data)
export const disableRltPro = data => req.post('/cq/cqPeRltPro/disableTask', data)

// 检查项
export const listRltChkitem = data => req.get('/cq/cqPeRltChkitem/list', data)
export const editRltChkitem = data => req.post('/cq/cqPeRltChkitem/edit', data)
export const enableRltChkitem = data => req.post('/cq/cqPeRltChkitem/enableTask', data)
export const disableRltChkitem = data => req.post('/cq/cqPeRltChkitem/disableTask', data)

// 项目检查池（耗时较长，超时设10分钟）
export const listProPoor = data => req.get('/cq/ctGcxSection/listProPoor', data, { timeout: 6e5 })
// 全部项目
export const listProPoorAll = data => req.get('/cq/ctGcxSection/listProPoorAll', data)
// 项目检查池历史（耗时较长，超时设10分钟）
export const getHisRange = data => req.get('/cq/cqPeProRange/getHisRange', data, { timeout: 6e5 })
// 获取加载检查池进度
export const getProcessList = data => req.get('/cq/ctGcxSection/getProcessList', data)
// 项目从检查池中永久删除
export const foreverDel = data => req.post('/cq/cqPeProSet/foreverDel', data)
// 恢复永久删除
export const recoverForeverDel = data => req.post('/cq/cqPeProSet/recoverForeverDel', data)
